package com.bjesc_b2c.app.appraiset.mvp.view.activity;

import android.view.View;
import android.widget.ImageView;

import com.bjesc_b2c.app.appraiset.R;
import com.bjesc_b2c.app.appraiset.base.BaseActivity;
import com.bm.library.PhotoView;
import com.bumptech.glide.Glide;

/**
 * Created by lenovo on 2017/3/10.
 */

public class ScaleBigPhotoActivity extends BaseActivity {
    private String imgUrls;
    @Override
    protected int getLayout() {
        return R.layout.activity_scale_big_photo;
    }

    @Override
    protected void initEventAndData() {
        imgUrls = getIntent().getStringExtra("imgUrls");
        initDatas();
    }

    @Override
    protected void createPresenter() {

    }

    private void initDatas() {
        PhotoView photoView = (PhotoView)findViewById(R.id.photoview);
        photoView.setScaleType(ImageView.ScaleType.FIT_CENTER);
        photoView.enable();
        photoView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        Glide.with(this).load(imgUrls).into(photoView);
    }
}
